<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CrateSCoursewareInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('s_courseware_info', function (Blueprint $table) {
            $table->increments('id');

            $table->string('title')->comment("课件标题")->index();

            $table->string('poster')->comment("封面");
            $table->string('res_url')->comment("资源地址");
            $table->string('file_id', 20)->comment("白板id");

            $table->integer('course_type')->comment("课程类型");
            $table->integer('times')->comment("时长，分钟");
            $table->integer('admin_id')->comment("最后操作人");

            $table->timestamps();
            $table->SoftDeletes();
        });

        Schema::table('s_cloud_lesson_info', function (Blueprint $table) {


            $table->integer('use_type')->after('id')->comment("0，学生，1：老师")->index();

            $table->integer('course_type')->comment("课程类型");


        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
